﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataLayer.dbml;
using System.Xml.Linq;
using System.Data.Linq.SqlClient;


namespace DataLayer.Controller
{
    /// <summary>
    /// Clase que controla las operaciones que se realizan sobre los documentos de soporte
    /// </summary>
    public class DocSopController : GenericController<DOC_SOP, DataClassesDataContext>
    {
        /// <summary>
        /// Retorna Documentos Asociados a una factura.
        /// </summary>
        /// <param name="billNumber"></param>
        /// <returns></returns>
        public static List<DOC_SOP> GetByBillNumber(string billNumber)
        {
            return (from r in DataContext.DOC_SOP
                     where r.NUMERO_FACTURA ==  billNumber
                     select r).ToList<DOC_SOP>();
        }

    }
}
